package it.stasbranger.myproject.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;

import it.stasbranger.myproject.client.managed.request.SuppliersProxy;

public class SuppliersProxyRenderer extends ProxyRenderer<SuppliersProxy> {
	private static SuppliersProxyRenderer INSTANCE;

	public static SuppliersProxyRenderer instance() {
		if (INSTANCE == null) {
			INSTANCE = new SuppliersProxyRenderer();
		}

		return INSTANCE;
	}

	protected SuppliersProxyRenderer() {
		super(new String[] { "id" });
	}

	public String render(SuppliersProxy object) {
		if (object == null) {
			return "";
		}

		return " (" + object.getName() + ")";
	}
}
